package com.prs.crm.domain.oa.schedule;

import java.util.Date;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.Cascade;

import com.prs.crm.domain.Attachment;
import com.prs.crm.domain.BaseEntity;
/***
 * 
 * @author Yanghao
 *	2012-8-13 14:07:53 工作计划
 */
@Entity
@Table(name="oa_workplan")
public class WorkPlan extends BaseEntity{

	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue
	private Integer id;
	/**标题*/
	private String title;
	/**内容*/
	private String content;
	/**创建时间*/
	private Date createTime;
	/**最后评论时间*/
	private String lastTime;
	/**评论*/
	private Integer replyNum;
	/**阅读*/
	private Integer readyNum;
	/**编辑时间*/
	private String updateTime;
	private Integer type;
	private String updatePerson;
	@ManyToOne(fetch=FetchType.LAZY)
	@Cascade({org.hibernate.annotations.CascadeType.ALL,org.hibernate.annotations.CascadeType.DELETE_ORPHAN})
	private Attachment attach;
	@OneToMany(fetch=FetchType.LAZY,mappedBy="workPlan")
	@Cascade({org.hibernate.annotations.CascadeType.ALL,org.hibernate.annotations.CascadeType.DELETE_ORPHAN})
	private List<WorkPlanReply> workPlanReply;
	private String showState;
	
	public String getShowState() {
		return showState;
	}
	public void setShowState(String showState) {
		this.showState = showState;
	}
	public String getUpdatePerson() {
		return updatePerson;
	}
	public void setUpdatePerson(String updatePerson) {
		this.updatePerson = updatePerson;
	}
	public String getUpdateTime() {
		return updateTime;
	}
	public void setUpdateTime(String updateTime) {
		this.updateTime = updateTime;
	}
	public Integer getType() {
		return type;
	}
	public void setType(Integer type) {
		this.type = type;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public String getLastTime() {
		return lastTime;
	}
	public void setLastTime(String lastTime) {
		this.lastTime = lastTime;
	}
	public Integer getReplyNum() {
		return replyNum;
	}
	public void setReplyNum(Integer replyNum) {
		this.replyNum = replyNum;
	}
	public Integer getReadyNum() {
		return readyNum;
	}
	public void setReadyNum(Integer readyNum) {
		this.readyNum = readyNum;
	}
	public Attachment getAttach() {
		return attach;
	}
	public void setAttach(Attachment attach) {
		this.attach = attach;
	}
	public List<WorkPlanReply> getWorkPlanReply() {
		return workPlanReply;
	}
	public void setWorkPlanReply(List<WorkPlanReply> workPlanReply) {
		this.workPlanReply = workPlanReply;
	}
	
}
